package org.hzz.application.command;

import io.gitee.pkmer.ddd.shared.command.CommandWithMark;
import io.gitee.pkmer.ddd.shared.service.CmdService;
import lombok.Value;
import org.hzz.application.handler.GetCouponCmdHandler;
import org.hzz.promotions.types.vo.CouponVo;

/**
 * @author <a href="mailto:1193094618@qq.com">pkmer</a>
 * <br>
 * <a href = "https://gitee.com/developeros/videos-online">Code Repository</a>
 * At 2024/9/1
 * 查询优惠券
 * {@link GetCouponCmdHandler}
 */
@Value(staticConstructor = "commandOf")
public class GetCouponCmd implements CommandWithMark {
    public static final String MARK = GetCouponCmd.class.getName();
    Long id;
    @Override
    public String mark() {
        return MARK;
    }

    public CouponVo executeWithResult(CmdService cmdService){
        return cmdService.<CouponVo>handleCommandWithResult(this);
    }
}
